package com.ophelisis.ibatis.handler;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.ophelisis.ibatis.SqlMapper;
import com.ophelisis.persistence.domain.ZipcodeVO;

public class handler_zipcode {
	/**
	 * 우편번호 - 목록
	 */
	@SuppressWarnings("unchecked")
	public static List<ZipcodeVO> getZipcodeList() throws SQLException {
		return SqlMapper.sqlMapClient.queryForList("common.getZipcodeList");
	}
	
	@SuppressWarnings("unchecked")
	public static List<ZipcodeVO> getZipcodeList(Map<String, Object> params) throws SQLException {
		return SqlMapper.sqlMapClient.queryForList("common.getZipcodeList", params);
	}

	/**
	 * 우편번호 - 목록 갯수
	 */
	public static Integer getZipcodeListCnt() throws SQLException {
		return (Integer)SqlMapper.sqlMapClient.queryForObject("common.getZipcodeListCnt");
	}
	
	public static Integer getZipcodeListCnt(Map<String, Object> params) throws SQLException {
		return (Integer)SqlMapper.sqlMapClient.queryForObject("common.getZipcodeListCnt", params);
	}
}
